<%--
  Created by IntelliJ IDEA.
  User: 86131
  Date: 2023/8/17
  Time: 19:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<c:set var="x" value="${requestScope.x}"/>
<html>
<head>
    <title>搜索</title>
    <script rel="script" src="${path}/js/jquery-3.6.4.js"></script>
    <link rel="stylesheet" type="text/css" href="${path}/css/sousuo.css">
</head>
<body onload="load(${x})">
<%@include file="header.jsp"%>
    <div id="bigbox">
        <div id="lan">
            <form method="post" action="${path}/MovieFlServlet?prom=ge&x=${x}">
                <input type="text" id="sou" name="sou" value="${name}">
                <span onclick="change1(${x})" style="display: inline-block"><input src="${path}/images/tool/sousuo.png" type="image" id="suo"></span>
            </form>
        </div>
        <div id="fe">
            <div id="ti">
                <ol>
                    <li id="jin">小喵建议您</li>
                    <li>请输入影视的关键字</li>
                    <li>请缩短影视的关键字</li>
                </ol>
            </div>
            <div id="dian" style="display: none">
                <c:set var="geList" value="${requestScope.geList}"/>
                <c:forEach items="${geList}" var="gel">
                    <div style="cursor: pointer" onclick="jQuery:window.location='MovieFlServlet?prom=select&movie_id=${gel.movie_id}'">
                        <div>
                            <img src="${path}/images/moviePicture/${gel.movie_picture}" id="tu">
                        </div>
                        <div id="nei">
                            <ul>
                                <li id="zm">${gel.movie_cn_name}</li>
                                <li id="ym">${gel.movie_fg_name}</li>
                                <li id="fen">${gel.movie_score}</li>
                                <li class="jie">${gel.movie_type}</li>
                                <li class="jie" id="shi">${gel.movie_releaseDate}${gel.movie_country}</li>
                            </ul>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>
    </div>
<%@include file="footer.jsp"%>
<script>
    function load(x){
        if(x==1){
            $("#ti").css("display","none");
            $("#dian").css("display","block");
        }
    }
    function change1(){
        $("#ti").css("display","none");
        $("#dian").css("display","block");
    }
</script>
</body>
</html>
